﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 租车
{
   class Truck:Vehicle
    {
        public int Load { get; set; }
        public Truck(string col, double dr, string ln, string nam,  int ys, int ld)
            : base(col, dr, ln, nam, ys)
        {
            Load = ld;
            Type = 0;
        }
        public override double cal(int d, int l)
        {
            if (d <= 30)
                return d * DailyRent;
            else if (d > 30)
                return 30 * DailyRent + 1.1 * DailyRent*l * (d - 30);
            else return 0;
        }
        public override int getload()
        {

            return Load;
        }
            
    }
}
